package net.roseparadise.model;
// default package

import javax.persistence.Column;
import javax.persistence.Embeddable;


/**
 * BlogCommentId entity. @author MyEclipse Persistence Tools
 */
@Embeddable

public class BlogCommentId  implements java.io.Serializable {


    // Fields    

     private Integer articleid;
     private Integer commentid;


    // Constructors

    /** default constructor */
    public BlogCommentId() {
    }

    
    /** full constructor */
    public BlogCommentId(Integer articleid, Integer commentid) {
        this.articleid = articleid;
        this.commentid = commentid;
    }

   
    // Property accessors

    @Column(name="ARTICLEID", nullable=false)

    public Integer getArticleid() {
        return this.articleid;
    }
    
    public void setArticleid(Integer articleid) {
        this.articleid = articleid;
    }

    @Column(name="COMMENTID", nullable=false)

    public Integer getCommentid() {
        return this.commentid;
    }
    
    public void setCommentid(Integer commentid) {
        this.commentid = commentid;
    }
   



   public boolean equals(Object other) {
         if ( (this == other ) ) return true;
		 if ( (other == null ) ) return false;
		 if ( !(other instanceof BlogCommentId) ) return false;
		 BlogCommentId castOther = ( BlogCommentId ) other; 
         
		 return ( (this.getArticleid()==castOther.getArticleid()) || ( this.getArticleid()!=null && castOther.getArticleid()!=null && this.getArticleid().equals(castOther.getArticleid()) ) )
 && ( (this.getCommentid()==castOther.getCommentid()) || ( this.getCommentid()!=null && castOther.getCommentid()!=null && this.getCommentid().equals(castOther.getCommentid()) ) );
   }
   
   public int hashCode() {
         int result = 17;
         
         result = 37 * result + ( getArticleid() == null ? 0 : this.getArticleid().hashCode() );
         result = 37 * result + ( getCommentid() == null ? 0 : this.getCommentid().hashCode() );
         return result;
   }   





}